package com.etv.launcher.model.entity;

import androidx.annotation.NonNull;
import androidx.room.ColumnInfo;
import androidx.room.Entity;
import androidx.room.PrimaryKey;

import com.etv.launcher.common.utils.TimeUtil;

import java.util.UUID;

import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

@Data
@ToString
@NoArgsConstructor
@Entity(tableName = "APPLICATION_INFO")
public class ApplicationInfoEntity {

    /**
     * 包名、主键
     */
    @NonNull
    @PrimaryKey
    @ColumnInfo(name = "APPLICATION_ID")
    private String applicationId;

    /**
     * app名字
     */
    @ColumnInfo(name = "APP_NAME")
    private String appName;



    /**
     * 0 系统应用，1用户安装应用
     */
    @ColumnInfo(name = "PM_TYPE")
    private Integer pmType;

    /**
     * 可见性
     */
    @ColumnInfo(name = "VISIBLE")
    private Boolean visible;

    /**
     * 图标路径
     */
    @ColumnInfo(name = "ICON_PATH")
    private String iconPath;

    /**
     * banner路径
     */
    @ColumnInfo(name = "BANNER_PATH")
    private String bannerPath;


    /**
     * 图标圆角
     */
    @ColumnInfo(name = "ICON_RADIUS")
    private float iconRadius = 14f;

    /**
     * 图标主颜色
     */
    @ColumnInfo(name = "PRIMARY_COLOR")
    private Integer primaryColor;

    /**
     * 图标背景颜色
     */
    @ColumnInfo(name = "BACK_COLOR")
    private Integer backColor;

    /**
     * 点击次数
     */
    @ColumnInfo(name = "CLICK_COUNT")
    private Integer clickCount;

    /**
     * 组件宽高
     */
    @ColumnInfo(name = "HEIGHT_DP")
    private Integer heightDp;

    /**
     * 组件宽高
     */
    @ColumnInfo(name = "WIDTH_DP")
    private Integer widthDp;

    /**
     * 图标类型：0应用图标，1文件夹
     */
    @ColumnInfo(name = "ICON_TYPE")
    private Integer iconType;

    /**
     * 外键：所属类型id
     */
    @ColumnInfo(name = "TYPE_CODE_FK")
    private String typeCode;

    /**
     * 创建时间
     */
    @ColumnInfo(name = "CREATE_TIME")
    private String createTime = TimeUtil.getCurrentTimeStr();

    /**
     * 更新时间
     */
    @ColumnInfo(name = "UPDATE_TIME")
    private String updateTime = TimeUtil.getCurrentTimeStr();
}
